import {
	request
} from '../utlis/http.js'
//待接订单列表
export const waitAccept = (params) => {
	return request('v1/workOrder/engineer/waitAccept', params, 'get')
}
//产品详情
export const productDetail = (params) => {
	return request(`v1/product/${params}`, params, 'get')
}
// 订单详情
export const workOrderDetail = (params) => {
	return request(`v1/workOrder/${params}`, params, 'get')
}
// 已完成订单详情
export const detailByRecordId = (params) => {
	return request(`v1/workOrder/detailByRecordId`, params, 'get')
}
//接单
export const workOrderAccept = (params) => {
	return request(`v1/workOrder/accept/${params}`, params, 'put')
}
//拒绝接单
export const workOrderreject = (params) => {
	return request(`v1/workOrder/reject/${params.id}?remark=${params.titles}`, params, 'put')
}
//工程师工单（已解决、未解决、已拒绝）分页查询
export const workOrder = (params) => {
	return request(`v1/workOrderEngineerRecord`, params, 'get')
}
//工程师工单(待接单、待处理、处理中)分页查询
export const engineerpage = (params) => {
	return request(`v1/workOrder/engineer/page`, params, 'get')
}
//提交电话处理报告
export const phoneReport = (params) => {
	return request(`v1/workOrderReport/phoneReport`, params, 'post')
}
//提交打卡
export const workOrdersignIn = (params) => {
	return request(`v1/workOrder/signIn/${params.roderId}`, params, 'put')
}
//
//提交工单报告
export const workOrderReportworkReport = (params) => {
	return request(`v1/workOrderReport/workReport`, params, 'post')
}
//获取服务报告
export const workOrderReport = (params) => {
	return request(`v1/workOrderReport/${params.id}`, {}, 'get')
}
//扫码取设备
export const getProduct = (params) => {
	return request(`/v1/product/${params.id}`, params, 'get')
}
//提交报修
export const workOrderPetition = (params) => {
	return request(`v1/workOrderPetition`, params, 'POST')
}
//获取地区树 v1/region/tree-county
export const regionTreeCounty = (params) => {
	return request(`v1/region/tree-county`, params, 'get')
}
//获取历史记录
export const workRecord = (params) => {
	return request(`v1/workRecord`, params, 'get')
}
//扫码获取设备信息
export const productDtl = (params) => {
	return request(`v1/product/${params.id}`, params, 'get')
}
//获取实验室列表
export const laboratoryList = (params) => {
	return request(`v1/laboratory`, params, 'get')
}
//更新设备信息
export const productEngineer = (params) => {
	return request(`v1/product/engineer/${params.id}`, params, 'put')
}
//巡检打卡
export const workOrderVirtual = (params) => {
	return request(`v1/workOrderVirtual`, params, 'post')
}
//获取SKU分组
export const skugrouping = (params) => {
	return request(`v1/sku/grouping`, params, 'get')
}
//工程师统计
export const engineerstatistics = (params) => {
	return request(`v1/workRecord/engineer/statistics`, params, 'get')
}
export const workRecordtotal = (params) => {
	return request(`v1/workRecord/total`, params, 'get')
}
//获取资料库
export const dataCategory = (params) => {
	return request(`v1/dataCategory`, params, 'get')
}
//获取阿里云配置
export const aliyunOssConf = (params) => {
	console.log('aliyunOssConf被调用')
	return request(`v1/aliyun/oss/conf`, params, 'get')
}